﻿using AutoMapper;

namespace IDI.Studio.Infrastructure.Crosscutting.Tests.Classes
{
    class TypeAdapterProfile : Profile
    {
        protected override void Configure()
        {
            var map = Mapper.CreateMap<Customer, CustomerDTO>();
            map.ForMember(dto => dto.CustomerId, mc => mc.MapFrom(e => e.Id));
            map.ForMember(dto => dto.FullName, mc => mc.MapFrom(e => string.Format("{0},{1}", e.LastName, e.FirstName)));
        }
    }
}
